<%@page contentType="content-type: application/x-javascript" pageEncoding="UTF-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>

google.load('visualization', '1.0', {'packages':['corechart']});
google.setOnLoadCallback(drawChart);

function drawChart() {
	var data = new google.visualization.DataTable();
	data.addColumn('string', '<s:text name="estadisticas.graficos.genero"/>');
	data.addColumn('number', '<s:text name="estadisticas.graficos.numero_managers"/>');
	data.addRows([
	<s:iterator value="datos" status="fila">
		<s:if test ="%{#fila.index!=0}">
			['Hombres', ${numero}],
		</s:if>
		<s:else>
			['Mujeres', ${numero}],
		</s:else>
	</s:iterator>
	]);
	var options = {'title':'<s:text name="estadisticas.managers_genero.titulo_grafico"/>','width':'100%','height':'300'};
	var chart = new google.visualization.PieChart(document.getElementById('chart_div'));
	chart.draw(data, options);
}